export const formComponentConfig = {
  selectLike: () =>
    import('@/views/supplier/components/formComp/selectLike.vue'),
  inputModal: () => import('@/common/components/search-modal/input-modal.vue'),
  dictSelect: () => import('@/common/components/dict-select/index.vue'),
  user: () => import('@/common/components/search-modal/user.vue'),
};

export const formRenderConfig = {
  planListNo: {
    label: '计划编号',
    field: 'planListNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入计划编号',
    },
  },
  projectCode: {
    label: '项目号',
    field: 'projectCode',
    componentName: 'inputModal',
    componentProps: {
      title: '项目号',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
      defaultQuery: {
        // 项目
        materialType: '6',
      },
    },
  },
  supplier: {
    label: '供应商',
    field: 'supplierCode',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商',
      type: 'supplyName',
      // objKey: 'id',
      labelName: 'supplierChinese',
      valueName: 'supplierCode',
    },
  },
  mdsItemCode: {
    label: '物料编码',
    field: 'mdsItemCode',
    componentName: 'inputModal',
    componentProps: {
      valueName: 'materialCode',
      labelName: 'materialCode',
      title: '物料编码',
      type: 'materialCode',
    },
  },
  productTypeNo: {
    label: '型号',
    field: 'productTypeNo',
    componentName: 'inputModal',
    componentProps: {
      title: '型号',
      type: 'materialCode',
      labelName: 'modelMark',
      valueName: 'materialCode',
    },
  },
  productSuperTypeNo: {
    label: '父型号',
    field: 'productSuperTypeNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入父型号',
    },
  },
  millTypeCode: {
    label: '机型',
    field: 'millTypeCode',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'materialCode',
      valueName: 'materialCode',
      labelName: 'materialCode',
    },
  },
  aircrafttype: {
    label: '机型',
    field: 'aircrafttype',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'materialCode',
      // objKey: 'id',
      labelName: 'materialCode',
      valueName: 'materialCode',
      defaultQuery: {
        // 机型
        materialType: '6',
        materialStatus: '1,3',
      },
    },
  },
  batchNo: {
    label: '批次',
    field: 'batchNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入批次',
    },
  },
  batchFlowNo: {
    label: '架次',
    field: 'batchFlowNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入架次',
    },
  },
  directorUserName: {
    label: '商务经理',
    field: 'directorUserName',
    componentName: 'user',
  },
  directorUserId: {
    label: '商务经理',
    field: 'directorUserId',
    componentName: 'user',
    componentProps: {
      placeholder: '请选择',
      valueName: 'id',
    },
  },
  editStartDate: {
    label: '计划编制时间',
    field: 'editStartDateArr',
    componentName: 'dateRangPicker',
    formItemProps: {
      // class: 'data-range',
      style: 'width: 596px !important',
    },
    componentProps: {
      valueKey: ['editStartDate', 'editEndDate'],
    },
  },
  // editEndDate: {
  //   label: '计划编制结束时间',
  //   field: 'editEndDate',
  //   componentName: 'datePicker',
  //   componentProps: {
  //     format: 'YYYY-MM-DD',
  //   },
  // },
  outSourceDeptName: {
    label: '外包提出单位',
    field: 'outSourceDeptName',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入外包提出单位',
    },
  },
  isChangeStatus: {
    label: '是否采购方式变更',
    field: 'purchaseState',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '是', value: 1 },
        { label: '否', value: 0 },
      ],
    },
  },
  requireSourceType: {
    label: '需求来源',
    field: 'requireSourceType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'requireSourceType',
    },
  },
  figurenumber: {
    label: '图号',
    field: 'figurenumber',
    componentName: 'inputModal',
    componentProps: {
      title: '图号',
      type: 'materialCode',
      // objKey: 'id',
      labelName: 'figureNumber',
      valueName: 'figureNumber',
    },
  },
  machineContent: {
    label: '加工内容',
    field: 'machineContent',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入加工内容',
    },
  },
  mdsCategoryLv1Name: {
    label: '一级品类',
    field: 'mdsCategoryLv1Name',
    componentName: 'inputModal',
    componentProps: {
      title: '品类选择',
      type: 'categoryName',
      labelName: 'categoryName',
      valueName: 'categoryName',
      defaultQuery: {
        // 项目
        categoryHierarchy: '一级',
      },
    },
  },
  mdsCategoryLv2Name: {
    label: '二级品类',
    field: 'mdsCategoryLv2Name',
    componentName: 'inputModal',
    componentProps: {
      title: '品类选择',
      type: 'categoryName',
      labelName: 'categoryName',
      valueName: 'categoryName',
      defaultQuery: {
        // 项目
        categoryHierarchy: '二级',
      },
    },
  },
  mdsCategoryLv3Name: {
    label: '三级品类',
    field: 'mdsCategoryLv3Name',
    componentName: 'inputModal',
    componentProps: {
      title: '品类选择',
      type: 'categoryName',
      labelName: 'categoryName',
      valueName: 'categoryName',
      defaultQuery: {
        // 项目
        categoryHierarchy: '三级',
      },
    },
  },
  picNo: {
    label: '零组件图号',
    field: 'picNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入零组件图号',
    },
  },
  partPicNo: {
    label: '零组件图号',
    field: 'picNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入零组件图号',
    },
  },
  picNoVersion: {
    label: '图号版本',
    field: 'picNoVersion',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入图号版本',
    },
  },
  processStateNo: {
    label: '工艺状态号',
    field: 'processStateNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入工艺状态号',
    },
  },
  categoryname: {
    label: '品类名称',
    field: 'categoryname',
    componentName: 'inputModal',
    componentProps: {
      title: '品类名称',
      type: 'materialCode',
      // objKey: 'id',
      labelName: 'figureNumber',
      valueName: 'figureNumber',
    },
  },
  endUpdateTime: {
    label: '最后修改时间',
    field: 'endUpdateTimes',
    componentName: 'dateRangPicker',
    formItemProps: {
      // class: 'data-range',
      style: 'width: 596px !important',
    },
    componentProps: {
      valueKey: ['startUpdateTime', 'endUpdateTime'],
    },
  },
  supplierCode: {
    label: '供应商编码',
    field: 'supplierCode',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商编码',
      type: 'supplyName',
      // objKey: 'id',
      labelName: 'supplierCode',
      valueName: 'supplierCode',
    },
  },
  supplierName: {
    label: '供应商名称',
    field: 'supplierName',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入供应商名称',
    },
  },
  name27: {
    label: '计划交货时间',
    field: 'name27',
    componentName: 'dateRangPicker',
    formItemProps: {
      // class: 'data-range',
      style: 'width: 596px !important',
    },
    componentProps: {
      valueKey: ['startUpdateTime', 'endUpdateTime'],
    },
  },
  planArrivalDate: {
    label: '计划交货时间',
    field: 'planArrivalDate',
    componentName: 'dateRangPicker',
    formItemProps: {
      // class: 'data-range',
      style: 'width: 596px !important',
    },
    componentProps: {
      valueKey: ['planArrivalDateStart', 'planArrivalDateEnd'],
    },
  },
  mdsItemName: {
    label: '物料名称',
    field: 'mdsItemName',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入物料名称',
    },
  },
  name29: {
    label: '选商策略',
    field: 'name29',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '男', value: 1 },
        { label: '女', value: 2 },
      ],
    },
  },
  billPolicy: {
    label: '选商策略',
    field: 'billPolicy',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'businessSelectionStrategy',
    },
  },
  name30: {
    label: '选商时间',
    field: 'name30',
    componentName: 'rangPicker',
    formItemProps: {
      // class: 'data-range',
      style: 'width: 596px !important',
    },
    componentProps: {
      format: 'YYYY-MM-DD',
    },
  },
  chooseSupplierDate: {
    label: '选商时间',
    field: 'chooseSupplierDate',
    componentName: 'dateRangPicker',
    formItemProps: {
      // class: 'data-range',
      style: 'width: 596px !important',
    },
    componentProps: {
      valueKey: ['chooseSupplierDateStart', 'chooseSupplierDateEnd'],
    },
  },
  name31: {
    label: '选商人',
    field: 'name31',
    componentName: 'user',
    componentProps: {
      placeholder: '请输入选商人',
    },
  },
  creator: {
    label: '选商人',
    field: 'creator',
    componentName: 'user',
    componentProps: {
      placeholder: '请输入选商人',
      valueName: 'userCode',
    },
  },
  creatorid: {
    label: '选商人',
    field: 'creator',
    componentName: 'user',
    componentProps: {
      placeholder: '请输入选商人',
    },
  },
  name32: {
    label: '任务编号',
    field: 'name32',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入任务编号',
    },
  },
  missionNo: {
    label: '任务编号',
    field: 'missionNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入任务编号',
    },
  },
  manufactureType: {
    label: '制造类型',
    field: 'manufactureType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'manufactureType',
    },
  },
  name34: {
    label: '是否采购',
    field: 'name34',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '是', value: 1 },
        { label: '否', value: 0 },
      ],
    },
  },
  purchaseState: {
    label: '是否采购',
    field: 'purchaseState',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '是', value: 1 },
        { label: '否', value: 0 },
      ],
    },
  },
  contractStatus: {
    label: '合同状态',
    field: 'contractStatus',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'contractStatus',
    },
  },
  name36: {
    label: '推送状态',
    field: 'name36',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '推状态', value: 1 },
        { label: '送状态', value: 2 },
      ],
    },
  },
  whetherDrawUpContract: {
    label: '是否编制合同',
    field: 'whetherDrawUpContract',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'whetherDrawUpContract',
    },
  },
  name38: {
    label: '采购品类',
    field: 'name38',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '男', value: 1 },
        { label: '女', value: 2 },
      ],
    },
  },
  inquiryNo: {
    label: '询价单编号',
    field: 'inquiryNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入询价单编号',
    },
  },
  queryUserName: {
    label: '询价人',
    field: 'queryUserName',
    componentName: 'user',
    componentProps: {
      placeholder: '请输入询价人',
    },
  },
  queryDate: {
    label: '询价日期',
    field: 'queryDate',
    componentName: 'rangPicker',
    formItemProps: {
      // class: 'data-range',
      style: 'width: 596px !important',
    },
    componentProps: {
      format: 'YYYY-MM-DD',
    },
  },
  name42: {
    label: '比价单编号',
    field: 'name42',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入比价单编号',
    },
  },
  compareNo: {
    label: '比价单编号',
    field: 'compareNo',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入比价单编号',
    },
  },
  name43: {
    label: '制单状态',
    field: 'name43',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '男', value: 1 },
        { label: '女', value: 2 },
      ],
    },
  },
  businessStatus: {
    label: '制单状态',
    field: 'businessStatus',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'businessStatus',
    },
  },
};
